﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="details.aspx.vb" Inherits="prototype.details" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="SqlDataSource1" 
            Height="50px" AutoGenerateRows="False" Width="100%" CellPadding="4" 
        ForeColor="#333333" GridLines="None">
           <AlternatingRowStyle BackColor="White" />
           <CommandRowStyle BackColor="#D1DDF1" Font-Bold="True" />
           <EditRowStyle BackColor="#2461BF" />
           <FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" />
           <Fields>
                <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
                    SortExpression="FirstName" />
                <asp:BoundField DataField="LastName" HeaderText="LastName" 
                    SortExpression="LastName" />

                <asp:BoundField DataField="DateOfBirth" HeaderText="DateOfBirth" 
                    SortExpression="DateOfBirth" />


                <asp:BoundField DataField="PlayingPosition" HeaderText="PlayingPosition" 
                    SortExpression="PlayingPosition" />
                <asp:BoundField DataField="ClubGoals" HeaderText="ClubGoals" 
                    SortExpression="ClubGoals" />
                <asp:BoundField DataField="Nationality" HeaderText="Nationality" 
                    SortExpression="Nationality" />
                <asp:BoundField DataField="PlayerDetails" HeaderText="PlayerDetails" 
                    SortExpression="PlayerDetails" />
                <asp:BoundField DataField="CurrentClub" HeaderText="CurrentClub" 
                    SortExpression="CurrentClub" />
                <asp:BoundField DataField="AddedDate" HeaderText="AddedDate" 
                    SortExpression="AddedDate" />
                <asp:BoundField DataField="AddedBy" HeaderText="AddedBy" 
                    SortExpression="AddedBy" />
                <asp:ImageField DataAlternateTextField="PlayerPicture" 
                    DataImageUrlField="PlayerPicture" DataImageUrlFormatString="/Pictures/{0}" 
                    HeaderText="PlayerPicture1">
                    <HeaderStyle Width="20%" />
                    <ControlStyle Height="250px" Width="500px" />
                </asp:ImageField>
                <asp:ImageField DataAlternateTextField="PlayerPicture2" 
                    DataImageUrlField="PlayerPicture2" DataImageUrlFormatString="/Pictures/{0}" 
                    HeaderText="PlayerPicture2">
                    <HeaderStyle Width="20%" />
                    <ControlStyle Height="250px" Width="500px" />
                </asp:ImageField>
                <asp:ImageField DataAlternateTextField="PlayerPicture3" 
                    DataImageUrlField="PlayerPicture3" DataImageUrlFormatString="/Pictures/{0}" 
                    HeaderText="PlayerPicture3">
                    <HeaderStyle Width="20%" />
                    <ControlStyle Height="250px" Width="500px" />
                </asp:ImageField>
            </Fields>
           <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
           <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
           <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
           <RowStyle BackColor="#EFF3FB" />
    </asp:DetailsView>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PlayersConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:PlayersConnectionString.ProviderName %>" 
        
        SelectCommand="SELECT [ID], [FirstName], [LastName], [PlayingPosition], [DateOfBirth], [ClubGoals], [Nationality], [PlayerDetails], [AddedDate], [AddedBy], [PlayerPicture3], [PlayerPicture2], [CurrentClub], [PlayerPicture] FROM [Players] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="SqlDataSource2" Width="100%" 
        CellPadding="4" ForeColor="#333333" GridLines="None">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="CTitle" HeaderText="Title" 
                SortExpression="CTitle" />
            <asp:BoundField DataField="Ctext" HeaderText="Comments" 
                SortExpression="Ctext" />
            <asp:BoundField DataField="UserID" HeaderText="Member Name" 
                SortExpression="UserID" />
            <asp:BoundField DataField="AddedDate" HeaderText="Added Date" 
                SortExpression="AddedDate" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>

    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PlayersConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:PlayersConnectionString.ProviderName %>" 
        SelectCommand="SELECT [ID], [Ctext], [CTitle], [UserID], [AddedDate], [PlayerID] FROM [Comments] WHERE ([PlayerID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

    <asp:Panel ID="Panel1" runat="server">


	        <asp:Rating ID="Rating1" runat="server" 
		        WaitingStarCssClass="WaitingStar" 
		        StarCssClass="Star"
		        FilledStarCssClass="FilledStar" 
		        EmptyStarCssClass="EmptyStar">
                </asp:Rating>
            <br />
            <br />
            <asp:Button ID="btn_Rate" runat="server" Text="Rate the Player !" />
            <br />
            <asp:Label ID="lbl_RatingThankYou" runat="server"></asp:Label>
            <br />

                <asp:CheckBoxList ID="CheckBoxList1" runat="server" 
                    DataSourceID="SqlDataSource" DataTextField="Tag" DataValueField="TagID" 
                    RepeatDirection="Horizontal">
                </asp:CheckBoxList>
                Add commas between tags :<br />
                <asp:TextBox ID="TextBox1" runat="server" Width="378px"></asp:TextBox>
                <asp:SqlDataSource ID="SqlDataSource" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:PlayersConnectionString %>" 
                    ProviderName="<%$ ConnectionStrings:PlayersConnectionString.ProviderName %>" 
                    SelectCommand="SELECT [TagID], [Tag] FROM [Tags]">
                </asp:SqlDataSource>
                <br />
                <asp:Button ID="AddTag" runat="server" Text="Add Tag For Players" />
                <br />
                <br />
                <br />
    <table align="center" >
        <tr>
            <td colspan="2">
                Add Comment about the Player here
            </td>
        </tr>
        <tr>
            <td >
                Title:
            </td>
            <td >
                <asp:TextBox ID="TB_Title" runat="server" MaxLength="255" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td >
                Text:
            </td>
            <td >
                <asp:TextBox ID="TB_Comment" runat="server" Height="100px" TextMode="MultiLine" 
                    Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center">
                <asp:Button ID="btn_submit" runat="server" Text="Add Comment" Width="172px" 
                     />
            </td>
        </tr>
    </table>
    </asp:Panel> 

</asp:Content>
